package com.flower.system.service.impl;

import java.util.List;
import com.flower.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flower.system.mapper.BizPeopleUpdatesMapper;
import com.flower.system.domain.BizPeopleUpdates;
import com.flower.system.service.IBizPeopleUpdatesService;

/**
 * 个人动态Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-03
 */
@Service
public class BizPeopleUpdatesServiceImpl implements IBizPeopleUpdatesService 
{
    @Autowired
    private BizPeopleUpdatesMapper bizPeopleUpdatesMapper;

    /**
     * 查询个人动态
     * 
     * @param id 个人动态主键
     * @return 个人动态
     */
    @Override
    public BizPeopleUpdates selectBizPeopleUpdatesById(String id)
    {
        return bizPeopleUpdatesMapper.selectBizPeopleUpdatesById(id);
    }

    /**
     * 查询个人动态列表
     * 
     * @param bizPeopleUpdates 个人动态
     * @return 个人动态
     */
    @Override
    public List<BizPeopleUpdates> selectBizPeopleUpdatesList(BizPeopleUpdates bizPeopleUpdates)
    {
        return bizPeopleUpdatesMapper.selectBizPeopleUpdatesList(bizPeopleUpdates);
    }

    /**
     * 新增个人动态
     * 
     * @param bizPeopleUpdates 个人动态
     * @return 结果
     */
    @Override
    public int insertBizPeopleUpdates(BizPeopleUpdates bizPeopleUpdates)
    {
        bizPeopleUpdates.setCreateTime(DateUtils.getNowDate());
        return bizPeopleUpdatesMapper.insertBizPeopleUpdates(bizPeopleUpdates);
    }

    /**
     * 修改个人动态
     * 
     * @param bizPeopleUpdates 个人动态
     * @return 结果
     */
    @Override
    public int updateBizPeopleUpdates(BizPeopleUpdates bizPeopleUpdates)
    {
        bizPeopleUpdates.setUpdateTime(DateUtils.getNowDate());
        return bizPeopleUpdatesMapper.updateBizPeopleUpdates(bizPeopleUpdates);
    }

    /**
     * 批量删除个人动态
     * 
     * @param ids 需要删除的个人动态主键
     * @return 结果
     */
    @Override
    public int deleteBizPeopleUpdatesByIds(String[] ids)
    {
        return bizPeopleUpdatesMapper.deleteBizPeopleUpdatesByIds(ids);
    }

    /**
     * 删除个人动态信息
     * 
     * @param id 个人动态主键
     * @return 结果
     */
    @Override
    public int deleteBizPeopleUpdatesById(String id)
    {
        return bizPeopleUpdatesMapper.deleteBizPeopleUpdatesById(id);
    }
}
